package cn.tedu.spring.bean;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class TestUserDao {
    public static void main(String[] args) {
        /*
            1.创建IoC容器: AnnotationConfigApplicationContext;
            2.获取Bean对象;
            3.打印测试.
         */

        ApplicationContext context = new AnnotationConfigApplicationContext
                ("cn.tedu.spring.bean.");
        UserService userService = context.getBean(UserService.class);
        System.out.println(userService);
    }
}
